local extension = Package:new("sifu_heg_test")
extension.extensionName = "sifu_heg"


local skill_present = fk.CreateActiveSkill{
  name = "skill_present",
  anim_type = "support",
  card_num = 0,
  card_filter = Util.FalseFunc,
  max_target_num = 1,
  target_filter = function (self, to_select, selected, selected_cards, card, extra_data)
    if #selected < 1 then
      return true
    end
  end,
  on_use = function (self, room, effect)
    local player = room:getPlayerById(effect.from)
    local target = room:getPlayerById(effect.tos[1]) or player
    local general = room:askForGeneral(player, room:getNGenerals(9), 1, false)
    local skills = Fk.generals[general]:getSkillNameList()
    if #skills == 0 then return end
    for _, skill_name in ipairs(skills) do
      room:handleAddLoseSkills(target, skill_name)
    end
  end,
}

local terminator = General(extension, "test_heg__terminator", "wild", 6)
terminator.trueName = "simayan"
for _, skill in ipairs{"rende", "cheat", "control", "damage_maker", "test_zhenggong", "change_hero", skill_present} do
  terminator:addSkill(skill)
end
terminator.hidden = true
Fk:loadTranslationTable{
  ["test_heg__terminator"] = "终结者",
  ["skill_present"] = "赠技",
  [":skill_present"] = "出牌阶段，你可以赠与一名角色一张武将牌上的技能。",
  ["sifu_heg_test"] = "测试包",
  ["test_heg"] = "测试"
}

return extension
